<template>
    <div>
            <div class="option flex unified-flex-align unified-flex-center">
                <el-button type="info" round @click="clickWarehouse">存入仓库</el-button>
                <el-button type="primary" round @click="clickRelease">立即发布</el-button>
            </div>
            <!-- 阅读协议 -->
            <div class=" flex unified-flex-align unified-flex-center">
                <input type="checkbox" :checkbox="read" @click="changeStatus" />
                <span>确认阅读并同意</span>
                <span>商品管理条款</span>
                <span>商品销售协议</span>
            </div>
    </div>



</template>

<script>
    export default {

        props: {

            read: {
                type: Boolean,
                default: false
            }

        },

        methods: {

            // 点击了 放入仓库
            clickWarehouse() {
                this.$emit('warehouse')
            },
            // 点击了 立即发布
            clickRelease() {
                this.$emit('release')
            },
            // 点击了阅读
            changeStatus() {
                this.$emit('change', !this.read)
            }
        }

    }
</script>

<style scoped="scoped">
    .option {
        margin: 25px 0px;
    }
</style>
